package cn.iune.erp.purchase;

import java.math.BigDecimal;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;
import com.alibaba.fastjson.JSONObject;

import cn.iune.common.base.IBizDataIface;

public interface IPurchaseOrderService extends IBizDataIface {

	List<PurchaseOrder> getAll();

	PurchaseOrder getByID(String fID);

	PurchaseOrder getByNo(String recordNo, String enterpriseNo);
	
	

	long getUnAgreeCount(String enterpriseNo);

	JSONObject save(JSONObject object) throws ParseException;

	JSONObject saveDetail(JSONObject object) throws ParseException;

	JSONObject query(JSONObject data) throws SQLException;

	int agreeIt(String fID, String tUsercode, String tUsername, String tUserid);

	void delete(String fID, String tUsercode, String tUsername, String tUserid);

	JSONObject queryDataDetail(JSONObject param);

	JSONObject newDataDetail(JSONObject param);

	int confirm(String fID, String ucode, String uname, String uid);

	int unAgree(String fID, String ucode, String uname, String uid);

	int open(String fID, String ucode, String uname, String uid);

	int active(String fID, String ucode, String uname, String uid);

	int close(String fID, String ucode, String uname, String uid);



	List<PurchaseOrderDetail> getByMasterID(String fMasterID);

	int updateStoreItemQuantityIng(String stockNo, String serialNo, String enterpriseNo, BigDecimal itemQuantity,
			BigDecimal wasterQuantity, BigDecimal ullageQuantity, BigDecimal arriveQuantityBack);

	int updateStoreItemQuantity(String stockNo, String serialNo, String enterpriseNo, BigDecimal itemQuantity,
			BigDecimal wasterQuantity, BigDecimal ullageQuantity, BigDecimal arriveQuantityBack,
			BigDecimal pieceQuantity);

	int updateBackItemQuantity(String stockNo, String serialNo, String enterpriseNo, BigDecimal itemQuantity,
			BigDecimal pieceQuantity);

	int updateStoreItemQuantityIng(String fID, BigDecimal itemQuantity);

	int updateStoreItemQuantity(String fID, BigDecimal itemQuantity);


}